Re-export glib, gio
authorColin Walters <walters@verbum.org>
Sat, 31 Jul 2021 21:15:03 +0000 (17:15 -0400)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:56 +0000 (12:53 -0400)
Re-export our dependencies.  See https://gtk-rs.org/blog/2021/06/22/new-release.html
"Dependencies are re-exported".  Users will need e.g. `gio::File`, so this avoids
them needing to update matching versions.

Closes: https://github.com/ostreedev/ostree-rs/issues/12
rust-bindings/rust/src/lib.rs
rust-bindings/rust/tests/repo/mod.rs

index 78f4a0018740eb69db0abd2b416320a104896d0e..8919c232c313818e8d62b913ba23060c06567c83 100644 (file)
@@ -6,6 +6,12 @@
 
 #![doc(html_root_url = "https://fkrull.gitlab.io/ostree-rs")]
 
+// Re-export our dependencies.  See https://gtk-rs.org/blog/2021/06/22/new-release.html
+// "Dependencies are re-exported".  Users will need e.g. `gio::File`, so this avoids
+// them needing to update matching versions.
+pub use gio;
+pub use glib;
+
 // code generated by gir
 #[rustfmt::skip]
 #[allow(clippy::all)]
@@ -59,4 +65,9 @@ mod tests;
 // prelude
 pub mod prelude {
     pub use crate::auto::traits::*;
+    // See "Re-export dependencies above".
+    #[doc(hidden)]
+    pub use gio::prelude::*;
+    #[doc(hidden)]
+    pub use glib::prelude::*;
 }
index ab23032c0542b49a91b5c826591512c06b017a82..6bf045b62f044c9badcb46184133396e6fc40bf1 100644 (file)
@@ -1,6 +1,7 @@
 use crate::util::*;
-use gio::{prelude::*, NONE_CANCELLABLE};
-use ostree::{ObjectType, *};
+use ostree::gio::NONE_CANCELLABLE;
+use ostree::prelude::*;
+use ostree::{ObjectName, ObjectType};
 
 #[cfg(feature = "v2016_8")]
 mod checkout_at;